Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Ensure that all opened editors' buffers are added to the project #16306

Merged
merged 2 commits into from Dec 1, 2017

Conversation

maxbrunsfeld
Copy link
Contributor

@maxbrunsfeld maxbrunsfeld commented Dec 1, 2017

This fixes a regression introduced in #16087 where if you created and opened an editor like this:

const buffer = new TextBuffer()
const editor = new TextEditor({buffer})
await atom.workspace.open(editor)

the editor's buffer would never have a language mode assigned to it.

/cc @as-cii - 馃帺 for finding this bug

Assigning a language mode happens when adding a buffer to the project,
so we need to guarantee this happens to all buffers used by visible editors.
@maxbrunsfeld maxbrunsfeld merged commit b930ad1 into master Dec 1, 2017
@maxbrunsfeld maxbrunsfeld deleted the mb-ensure-buffers-have-language-modes branch December 1, 2017 18:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant